home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Games Machine 79
/
XENIATGM79.iso
/
E-Mail
/
Paolo DeFelice
/
arc
/
textures.js
< prev
Wrap
Text File
|
1999-08-13
|
2KB
|
73 lines
function tile(Numero){
if (!document.all)
return;
which=Numero;
var source=event.srcElement;
if (source.tagName=="IMG")
document.body.style.backgroundImage="url("+photos[which]+")";
alphaoff(Numero);
window.status=photos[which];
return true;}
function alphaoff(Numero){
test="im"+(Numero+1);
provatimer=setInterval("prova(test)", 100);}
function prova(x){
if(document[x].filters.alpha.opacity>50){
document[x].filters.alpha.opacity -= 10;
}
else{clearInterval(provatimer);}
}
var loadTimer;
var Ava;
var PreIm=new Array();
function bm() {
Ava=0;
loadTimer=setInterval("ImgStart()",10);
return true;
}
function ImgStart(){
if (Ava==0){
PreIm[Ava] = new Image();
PreIm[Ava].src=photos[Ava];
}
if(Ava>NumPic){
clearInterval(loadTimer);
return;
}
if (PreIm[Ava].complete){
loaded=Ava;
var j = Ava+1;
document.images["im"+j].src=PreIm[Ava].src
Ava++;
PreIm[Ava] = new Image();
PreIm[Ava].src=photos[Ava];
}
}
//-->
<!--
/*By George Chiang (WA JavaScript site www.abstract.simplenet.com)
Credit must stay intact for use*/
function tilew(numP){
if(loaded<numP){return;}
win2=window.open("","","width=700,height=500");
if (win2){
win2.focus();
win2.document.open();
win2.document.write("<head><title>"+photos[numP]+"</title></head>");
win2.document.write("<body background="+'"'+PreIm[numP].src+'"'+">");
win2.document.write("</body>");
win2.document.close();
}
else
alert("Failed in spawning a new window!");
}